package com.mt.roll.core.dal.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 数据字典表
 * </p>
 *
 * @author mt
 * @since 2022-03-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_data_dictionary")
public class DataDictionary extends Model<DataDictionary> {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
      @TableId("id")
    private Long id;

    /**
     * 数据类型
     */
    @TableField("data_type")
    private String dataType;

    /**
     * 数据分类（用于区分哪个模块）
     */
    @TableField("data_category")
    private String dataCategory;

    /**
     * 数据值
     */
    @TableField("data_value")
    private String dataValue;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 删除标志，是否有效:1 可用 0不可用
     */
    @TableField("valid")
    @TableLogic
    private Integer valid;

    /**
     * 创建人
     */
    @TableField("creator_id")
    private Long creatorId;

    /**
     * 创建人姓名
     */
    @TableField("creator_name")
    private String creatorName;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 更新人
     */
    @TableField("updater_id")
    private Long updaterId;

    /**
     * 更新人姓名
     */
    @TableField("updater_name")
    private String updaterName;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 版本号
     */
    @TableField("version")
    @Version
    private Integer version;

    /**
     * 扩展字段1
     */
    @TableField("data_code_ext1")
    private String dataCodeExt1;

    /**
     * 扩展字段2
     */
    @TableField("data_code_ext2")
    private String dataCodeExt2;

    /**
     * 扩展字段3
     */
    @TableField("data_code_ext3")
    private String dataCodeExt3;

    /**
     * 启用状态:0 、停用，1、启用
     */
    @TableField("enabled")
    private Integer enabled;


    public static final String ID = "id";

    public static final String DATA_TYPE = "data_type";

    public static final String DATA_CATEGORY = "data_category";

    public static final String DATA_VALUE = "data_value";

    public static final String REMARK = "remark";

    public static final String VALID = "valid";

    public static final String CREATOR_ID = "creator_id";

    public static final String CREATOR_NAME = "creator_name";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATER_ID = "updater_id";

    public static final String UPDATER_NAME = "updater_name";

    public static final String UPDATE_TIME = "update_time";

    public static final String VERSION = "version";

    public static final String DATA_CODE_EXT1 = "data_code_ext1";

    public static final String DATA_CODE_EXT2 = "data_code_ext2";

    public static final String DATA_CODE_EXT3 = "data_code_ext3";

    public static final String ENABLED = "enabled";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
